<!-- Module PrestaTheme -->
{capture name=path}
    <a href="{$link->getModuleLink('prestatheme', 'myprojects', [], true)}">{l s='My projects'}</a>
    <span class="navigation-pipe">{$navigationPipe}</span>
    {if empty($title)}
        {l s='New project' mod='prestatheme'}
    {else}
        {$title}
    {/if}
{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}

<h2>{l s='Edit a project' mod='prestatheme'}</h2>
{include file="$tpl_dir./errors.tpl"}

<form method="post" class="std" id="edit_project">
	<fieldset>
        <p class="required text">
            <label for="name" id="label_name">{l s='Your project name' mod='prestatheme'}</label>
            <input type="text" id="name" name="project[name]" value="{$project->name}" />
			<sup>*</sup>
            <span class="form_info">{l s='Alpanumeric chacarters, possible separator: "-", "_"'}</span>
        </p>
        <p class="required text">
        	<label for="project[id_cms]" id="label_id_cms">{l s='The CMS for your project' mod='prestatheme'}</label>
        	<select name="project[id_cms]">
                {foreach from=$cmsList item=cms}
                    <option value="{$cms->id}"{if $cms->id == $project->id_cms} selected="selected"{/if}>{$cms->getCMSName()}</option>
                {/foreach}
        	</select>
			<sup>*</sup>
        </p>
        <p class="required text">
            <label for="is_public" id="label_is_public">{l s='Is public' mod='prestatheme'}</label>
            <input type="checkbox" id="is_public" name="project[is_public]" value="1" {if $project->is_public}checked="checked"{/if} />
            <span class="form_info">{l s='Check if your project can be available for others members' mod='prestatheme'}</span>
        </p>
        <p class="required textarea">
            <label for="description" id="label_description">{l s='Describe your project' mod='prestatheme'}</label>
            <textarea id="description" name="project[description]">{$project->description}</textarea>
        </p>
	</fieldset>
    
    <p class="submit2">
        {if !empty($project->id)}
        <input type="hidden" name="project[id_project]" value="{$project->id}" />
        {/if}
        <input type="submit" class="button" name="create" value="{l s='Save the project' mod='prestatheme'}" />
        <input type="submit" class="button" name="createAndRunEditor" value="{l s='Save and run the project' mod='prestatheme'}" />
    </p>
</form>
<!-- /Module PrestaTheme -->
